# encoding: utf-8
# Model for holding municipality (kunta) codes and descriptions
class Municipality < ActiveRecord::Base
  attr_accessible :code, :description_fin, :description_swe, :description_eng
  validates_uniqueness_of :code
  
  def as_json(options={})
    {self.code => {:fin => self.description_fin, :swe => self.description_swe, :eng => self.description_eng}}
  end
end
